package configure

import (
	"gitee.com/xgotool/backend-framework-template/config"
	"gitee.com/xiaoyutab/xgotool/individual/xginplus"
)

// 保存配置项信息
//
//	POST	admin/system/configure/save
func Save(c *xginplus.Context) *xginplus.Response {
	mod := config.Ext{}
	err := c.Bind(&mod)
	if err != nil {
		return c.Error(err)
	}
	err = mod.Save()
	if err != nil {
		return c.Error(err)
	}
	return c.SuccessEmpty()
}
